package com.magold.logic.polygon;

import com.badlogic.gdx.physics.box2d.JointDef;
import com.badlogic.gdx.physics.box2d.joints.GearJointDef;

public class GearJointWrapperDef extends JointDef {

	public GearJointWrapperDef() {
	}
	
	public void initialize(int pJointAIndex, int pJointBIndex, float pRatio) {
		mJointAIndex = pJointAIndex;
		mJointBIndex = pJointBIndex;
		mRatio = pRatio;
	}
	
	/* package */ GearJointDef change(CompositePrimitive pCompositePolygon) {
		GearJointDef gearDef = new GearJointDef();
		gearDef.joint1 = pCompositePolygon.getJoint(mJointAIndex);
		gearDef.joint2 = pCompositePolygon.getJoint(mJointBIndex);
		gearDef.ratio = mRatio;
		return gearDef;
	}
	
	public int mJointAIndex;
	public int mJointBIndex;
	public float mRatio = 1.0f;
	
}
